<?php
$subj_model = $this->subjectdata;
$updated_data_name = $this->admindata;
?>
<div id="pad-wrapper">
     <div class="row pagelist-header">
        <h3><?php echo $this->translate("subject_menu")." ".$this->translate("detail_title"); ?></h3>
     </div>
    <div class="table-products">
        
        <div class="row-fluid ">
            <div class="pull-right">
                <a class="btn-flat new-product" href="<?php echo $this->url(array('module' => 'default', 'controller' => 'subject', 'action' => 'list'), null, TRUE); ?>"><?php echo $this->translate("detail_back"); ?></a>
            </div>              
        </div>

        <div class="main_detail">
            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_name"); ?>: </div>
                <div class="detail_data"><?php echo ucfirst($subj_model['subj_name']); ?></div>
            </div>

            
            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_site"); ?>: </div>
                <div class="detail_data"><?php echo $subj_model['site_name']; ?></div>
            </div>
            
            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_department"); ?>: </div>
                <div class="detail_data"><?php echo $subj_model['dep_name']; ?></div>
            </div>
            
            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_type"); ?>: </div>
                <div class="detail_data"><?php echo $subj_model['child_name'];?></div>
            </div>

            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_delay"); ?>: </div>
                <div class="detail_data"><?php echo $subj_model['subj_delay']; ?></div>
            </div>

              <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_instruction"); ?>: </div>
                <div class="detail_data">
                    <?php 
                    if($subj_model['subj_instruction'] != ''):
                    if (file_exists($this->UPLOAD_PATH . "subject/" . $subj_model['subj_instruction'])): ?>
                     <?php
                        $src_path = $this->PUBLIC_PATH . "img/document.png";
                    ?>
                        <img src="<?php echo $src_path; ?>" height="100" width="100"/>    
                        &nbsp;
                        <a class="label label-add" href="<?php echo $this->PUBLIC_PATH . "upload/subject/".$subj_model['subj_instruction']?>" target="_blank">
                        View</a>
                    <!--<img src="<?php echo $this->PUBLIC_PATH . "upload/subject/".$subj_model['subj_instruction']?>" height="100" width="100">
                   --> <?php endif;
                    endif;
                    ?>
                </div>
            </div>


            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_createdate"); ?>: </div>
                <div class="detail_data"><?php echo date('Y-m-d', strtotime($subj_model['subj_createddate'])); ?></div>
            </div>

            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_updatedate"); ?>: </div>
                <div class="detail_data"><?php echo date('Y-m-d', strtotime($subj_model['subj_updateddate'])); ?></div>
            </div>

            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_updated_by"); ?>: </div>
                <div class="detail_data">
<?php echo $updated_data_name; ?>
                </div>
            </div>

            <div class="sub_main">
                <div class="detail_label"><?php echo $this->translate("subj_frm_status"); ?>: </div>
                <div class="detail_data">
                    <?php echo ( $subj_model['subj_status'] == 1 ) ? 'Active' : 'Inactive'; ?>
                </div>
            </div>

        </div>

    </div>
</div>
<div style="clear: both"></div>
<a class="back_bottom" href="<?php echo $this->url(array('module' => 'default', 'controller' => 'subject', 'action' => 'list'), null, TRUE); ?>"><?php echo $this->translate("detail_back"); ?></a>
